package homework;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class A {
    public static void main(String[] args) {
        Random r = new Random();
        List list = new ArrayList();
        //存入数据
        while(list.size()!=10){
            int num = r.nextInt(100) + 1;
            if(!list.contains(num)){
                list.add(num);
            }
        }
        System.out.println(list);
    }
}
